Enables treatment of a data source as if it was ordered, overriding the default of unordered.
AsOrdered may only be invoked on sequences returned by AsParallel, ParallelEnumerable.Range,
and ParallelEnumerable.Repeat.
Namespace:
System.Linq
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Shared Function AsOrdered(Of TSource) ( _
source As ParallelQuery(Of TSource) _
) As ParallelQuery(Of TSource) |
Type Parameters
- TSource
- The type of elements of source.
Return Value
The source sequence which will maintain ordering in the query.
Remarks
Exceptions
Exception | Condition |
---|
System..::.InvalidOperationException |
Thrown if source is not one of AsParallel, ParallelEnumerable.Range, or ParallelEnumerable.Repeat.
|
System..::.ArgumentNullException |
source is a null reference (Nothing in Visual Basic).
|
See Also